var BaseUsersex = app.controller('BaseUsersex', function($rootScope, $scope, $http,$state,BaseUsersexData) {
	try{
		$rootScope.showf=false;
		$rootScope.title = '性别';
		$scope.sexs={};
		var url=SITE_URL+"index.php?app=baseloginapp&callback=JSON_CALLBACK&act=sex";
		$http.jsonp(url).success(function(data) {
			$scope.sexs=data.retval;
		});	
		
		$scope.checksex=function(s){
			$rootScope.btrs1_user_sex=s;
			$rootScope.back();
		}
	}
	catch (e) {
		showcatch(e);
	}
});
BaseUsersex.BaseUsersexData=function($q, $http,$stateParams,$rootScope){
	try {
		var data = [];
		var def = $q.defer();
		if(window.localStorage.u==undefined||window.localStorage.u==null||window.localStorage.u==""){			
			$rootScope.go("loginmain");
		}else{
			def.resolve(data);
		}
		
		return def.promise;
	} catch (e) {
		showcatch(e);
	}
}